﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LibraryO2S;
public partial class Administrator_ReportAdd : System.Web.UI.Page
{


    BizReport report = new BizReport();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            string createdby = Session["USERNAME"].ToString();
            report.Insert(txtTitle.Text, txtDescription.Text, txtURL.Text, DateTime.Parse(txtStartDate.Text), DateTime.Parse(txtEndDate.Text), DateTime.Now, createdby);
            divMessage.InnerHtml = O2S_Message.Success("Hệ thống", "Thực hiện thành công");

        }
        catch (Exception ex)
        {
            divMessage.InnerHtml = O2S_Message.Error("Hệ thống", "Phát hiện lỗi" + ex.Message);
        }

    }
}